<?php namespace Common\Model;
use Hdphp\Model\Model;
	class Homeuser extends Model{
//		指定表名
		protected $table="homeuser";
//		自动验证
		protected $validate=array(
			array('homename','required','账号不能为空',3,3),
			array('homepassword','required','密码不能为空',3,3),
		
		);
		public function store(){
			if($_POST){
				$_POST['homepassword'] = Q('post.homepassword','','md5');
				if($this->create()){
					$this->add();
					return true;
				}else{
					return false;
				} 
				
			}
			
		}
		
		
	}
		
	
	
	
	
	
	
	
	
	
	
	
	
?>